package com.zyz.rest;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

/**
 * 2016/8/23.
 *
 * @author zhangyizhi
 */
@RestController
public class IndexController {
    private String message = "hello world";

    @RequestMapping("/")
    public Message home() {
        return new Message(this.message);
    }
}

class Message {
    private String id = UUID.randomUUID().toString();
    private String content;

    Message() {
    }

    public Message(String content) {
        this.content = content;
    }

    public String getId() {
        return id;
    }

    public String getContent() {
        return content;
    }
}
